package dk.ucn.datamatiker.henrik.compass;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class CompassActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_compass);
		
		//Metode 1
//		CompassView cv = (CompassView)this.findViewById(R.id.compassView);
//		cv.setBearing(45);
		
		//Metode 2
		CompassView cv = new CompassView(this);
		setContentView(cv);
		cv.setBearing(135);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_compass, menu);
		return true;
	}

}
